package edu.notebook.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import edu.notebook.domain.Note;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;


@Mapper
public interface NoteDao extends BaseMapper<Note> {

    /**
     * 查询 confident_level 等于 1 的所有数据，显示在主页面上面
     * @return List<Note>
     */
    @Select("SELECT * FROM note WHERE confident_level = 1 LIMIT :#{pageSize} OFFSET :offset")
    List<Note> selectAllByConfidentLevel();


}
